package com.zzg.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


import com.zzg.service.ComputeService;

@Controller
@RequestMapping("/api/dubbo")
public class DemoController {
	@Autowired
	private ComputeService service;
	
	@RequestMapping(value="/add", method={RequestMethod.GET})
	@ResponseBody
	public Integer add(@RequestParam Integer a, @RequestParam Integer b) {
		Integer result = service.add(a, b);
		return result;
	}
	
	

}
